<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<f:metadata>
        <f:viewParam name="idAide" value="#{aideBean.idAide}">
            <f:convertNumber/>
        </f:viewParam>
        <f:event type="preRenderView" listener="#{aideBean.supprimer}"/>
 </f:metadata>
<h:body>

  <ui:composition template="outils/template.xhtml">

  <ui:define name="titre"><h:outputText value="#{b.gestionaide}"/></ui:define>
 
   <ui:define name="centre">
        <center>
        <div id="boite">
        <div class="formulaire">
            <div class="titreformulaire"><h:outputText value="#{b.gestionaide}"/></div>

            <div id="menulien">
                <h:link outcome="aide" value="#{b.lister}">
                    <img src="images/lister.png" alt="#{b.lister}" title="#{b.lister}" border="0"/>
                </h:link><br/>
                <h:link outcome="editerAide" value="#{b.ajouter}">
                    <img src="images/ajouter.png" alt="#{b.ajouter}" title="#{b.ajouter}" border="0"/>
                </h:link><br/>
            </div>

            <h:dataTable value="#{aideBean.listeAides}" var="aide" id="tableau" rowClasses="ligne1, ligne2" cellspacing="1">
            <h:column>
                <f:facet name="header"><h:outputText value="#{b.page}"/></f:facet>
                <h:outputText value="#{aide.page}"/>
            </h:column>
            <h:column>
                <f:facet name="header"><h:outputText value="#{b.contenu}"/></f:facet>
                <h:outputText value="#{aide.contenu}" escape="false"/>
            </h:column>
            <h:column>
                <f:facet name="header"><center><h:outputText value="#{b.gestion}"/></center></f:facet>
                <center>

                <h:link outcome="editerAide?faces-redirect=true">
                    <img src="images/editer.png" alt="#{b.editer}" title="#{b.editer}" border="0"/>
                    <f:param name="idAide" value="#{aide.idAide}"/>
                </h:link>&nbsp;&nbsp;

                <a href="JavaScript:confirmerSupprimerAide('#{aide.idAide}');">
                    <img src="images/supprimer.png" alt="#{b.supprimer}" title="#{b.supprimer}" border="0"/>
                </a>
                </center>
            </h:column>
            </h:dataTable>
            </div>
        </div>
       </center>
   </ui:define>

 </ui:composition>
</h:body>
</html>
